package com.sankuai.project.exception;

import com.sankuai.project.enums.ResultCodeEnum;

/**
 * @Author：YH
 * @Description：
 * @Date:Created in 2024/1/20 15:26
 */
public class TestException extends RuntimeException {
    private Integer code;

    public TestException(ResultCodeEnum resultCodeEnum) {
        // 调用父类的方法添加信息
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }
}
